package com.wopinla.service.impl;
import com.wopinla.dao.AdminDao;
import com.wopinla.dao.CollectDao;

import com.wopinla.dao.CommentDao;
import com.wopinla.pojo.*;

import com.wopinla.pojo.collect;
import com.wopinla.service.AdminService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Map;

@Service   //添加注解

public class AdminServiceImpl implements AdminService{

    //注入dao层（调用dao）
    @Autowired
    private AdminDao adminDao;
    @Override
    public int closeuser(Map<String, Object> map)
    {
        SimpleDateFormat df = new  SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
        String otime=df.format(new Date());
        map.put("time",otime);
        return adminDao.closeuser(map);
    }
    @Override
    public int userroot(Map<String, Object> map)
    {
        return adminDao.userroot(map);
    }
    @Override
    public int userpassword(Map<String, Object> map)
    {
        return adminDao.userpassword(map);
    }
    @Override
    public int notice(Map<String, Object> map)
    {
        SimpleDateFormat df = new  SimpleDateFormat("yyyy-MM-dd HH:mm:ss");//设置日期格式
        String time=df.format(new Date());
        map.put("time",time);
        return adminDao.notice(map);
    }

}
